fix: update Flutter deprecated list APIs#1174
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR migrates multiple ReorderableListView usages from onReorder to onReorderItem and removes the previous downward-move index compensation, updates a ListView to use ScrollCacheExtent.pixels, propagates editor light/dark theme args to EditorPage, filters iCloud backup entries with null timestamps, integrates a generated local Swift package into iOS/macOS Xcode projects, adds SwiftPM lockfiles and scheme preactions, bumps pubspec Flutter SDK to >=3.44.0 and converts two dependencies to Git refs, updates several submodule pointers, and adjusts CI workflows to reference Flutter 3.44.1 (build) and unpin analysis. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ios/Runner.xcodeproj/project.pbxproj`:
- Around line 1238-1241: The XCSwiftPackageProductDependency entry for
FlutterGeneratedPluginSwiftPackage is missing the required package reference;
update the XCSwiftPackageProductDependency object (the one named
FlutterGeneratedPluginSwiftPackage) to include a package = <identifier> /*
XCLocalSwiftPackageReference */; field that points to the corresponding
XCLocalSwiftPackageReference entry so the product is explicitly linked to its
package.
In `@lib/data/ssh/persistent_shell.dart`:
- Line 166: The code is using the wrong named parameter `_allowMalformed` on
Utf8Decoder which causes a compile error; update the Utf8Decoder invocations
used in the stream transforms (the .transform(const Utf8Decoder(...)) calls in
persistent_shell.dart, e.g., inside the PersistentShell read/stream handling
methods) to use the correct named parameter allowMalformed: true instead of
_allowMalformed: true, and ensure both occurrences (the one at line ~166 and the
one at line ~175) are corrected.
In `@pubspec.yaml`:
- Around line 33-36: The pubspec currently references moving branch refs for the
git dependencies re_editor and icons_plus (ref: main); update both dependency
entries in pubspec.yaml to pin them to immutable refs by replacing ref: main
with a specific tag name or commit SHA (e.g., ref: vX.Y.Z or ref: <commit-sha>)
so builds are deterministic and won’t pull unreviewed upstream changes; locate
the re_editor and icons_plus git blocks and set their ref values to the chosen
tag or commit SHA.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8798657f-9a4d-4fed-a2b8-b76f4374f039
⛔ Files ignored due to path filters (2)
ios/Podfile.lockis excluded by!**/*.lockpubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (11)
.github/workflows/build.ymlios/Runner.xcodeproj/project.pbxprojios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolvedios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemeios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolvedlib/data/ssh/persistent_shell.dartpackages/circle_chartpackages/fl_libpackages/plain_notification_tokenpackages/watch_connectivitypubspec.yaml
✅ Files skipped from review due to trivial changes (4)
- packages/watch_connectivity
- .github/workflows/build.yml
- ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
- ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved
| re_editor: | ||
| git: | ||
| url: https://github.com/lollipopkit/re-editor | ||
| ref: main |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify git dependency pinning and lockfile resolved refs (read-only).
set -euo pipefail
echo "== pubspec.yaml git refs =="
rg -n -A3 -B1 '^\s{2}(re_editor|icons_plus):|^\s{4}git:|^\s{6}url:|^\s{6}ref:' pubspec.yaml
LOCKFILE="$(fd -a '^pubspec\.lock$' | head -n1 || true)"
if [[ -n "${LOCKFILE}" ]]; then
echo
echo "== pubspec.lock resolved refs for re_editor/icons_plus =="
rg -n -A8 -B2 're_editor:|icons_plus:|resolved-ref:|ref:' "${LOCKFILE}"
else
echo
echo "pubspec.lock not found; cannot verify resolved-ref pinning."
fiRepository: lollipopkit/flutter_server_box
Length of output: 2228
Pin git dependencies to immutable commits/tags instead of main.
Using moving branch refs makes builds non-deterministic and can pull unreviewed upstream changes after merge. Both re_editor (line 36) and icons_plus (line 52) should be pinned to immutable tags or commit SHAs.
🔧 Suggested change
re_editor:
git:
url: https://github.com/lollipopkit/re-editor
- ref: main
+ ref: <tag-or-commit-sha>
@@
icons_plus:
git:
url: https://github.com/lollipopkit/icons_plus
- ref: main
+ ref: <tag-or-commit-sha>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pubspec.yaml` around lines 33 - 36, The pubspec currently references moving
branch refs for the git dependencies re_editor and icons_plus (ref: main);
update both dependency entries in pubspec.yaml to pin them to immutable refs by
replacing ref: main with a specific tag name or commit SHA (e.g., ref: vX.Y.Z or
ref: <commit-sha>) so builds are deterministic and won’t pull unreviewed
upstream changes; locate the re_editor and icons_plus git blocks and set their
ref values to the chosen tag or commit SHA.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ios/Runner/AppDelegate.swift (1)
22-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix missing
FlutterResulthandling inhome_widgetmethod channel
homeWidgetChannel.setMethodCallHandlercontains noresult(...)call (including when handling"update"), so DartinvokeMethodcan remain pending indefinitely.Suggested fix
- homeWidgetChannel.setMethodCallHandler({(call: FlutterMethodCall, result: `@escaping` FlutterResult) -> Void in - if call.method == "update" { - if `#available`(iOS 14.0, *) { - WidgetCenter.shared.reloadTimelines(ofKind: "StatusWidget") - } - } - }) + homeWidgetChannel.setMethodCallHandler({ (call: FlutterMethodCall, result: `@escaping` FlutterResult) -> Void in + switch call.method { + case "update": + if `#available`(iOS 14.0, *) { + WidgetCenter.shared.reloadTimelines(ofKind: "StatusWidget") + } + result(nil) + default: + result(FlutterMethodNotImplemented) + } + })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ios/Runner/AppDelegate.swift` around lines 22 - 28, The method channel handler registered with homeWidgetChannel.setMethodCallHandler does not call the provided FlutterResult, leaving Dart calls hanging; update the handler in AppDelegate.swift to call result(nil) after handling the "update" case (after WidgetCenter.shared.reloadTimelines(ofKind: "StatusWidget")) and to call result(FlutterMethodNotImplemented) for any unrecognized call.method, and if an error occurs call result(FlutterError(...)) so every execution path uses the FlutterResult.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@ios/Runner/AppDelegate.swift`:
- Around line 22-28: The method channel handler registered with
homeWidgetChannel.setMethodCallHandler does not call the provided FlutterResult,
leaving Dart calls hanging; update the handler in AppDelegate.swift to call
result(nil) after handling the "update" case (after
WidgetCenter.shared.reloadTimelines(ofKind: "StatusWidget")) and to call
result(FlutterMethodNotImplemented) for any unrecognized call.method, and if an
error occurs call result(FlutterError(...)) so every execution path uses the
FlutterResult.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2845a357-1774-4c3d-aef1-e5b1dd630342
⛔ Files ignored due to path filters (3)
ios/Podfile.lockis excluded by!**/*.lockmacos/Podfile.lockis excluded by!**/*.lockpubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (14)
ios/Runner.xcodeproj/project.pbxprojios/Runner/AppDelegate.swiftios/Runner/Info-Debug.plistios/Runner/Info-Profile.plistios/Runner/Info-Release.plistios/Runner/Info.plistlib/view/page/backup.dartlib/view/page/setting/entries/app.dartlib/view/page/storage/local.dartlib/view/page/storage/sftp.dartmacos/Flutter/GeneratedPluginRegistrant.swiftmacos/Runner.xcodeproj/project.pbxprojmacos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemepackages/fl_lib
✅ Files skipped from review due to trivial changes (2)
- packages/fl_lib
- lib/view/page/storage/sftp.dart
Summary
Verification
Notes
Summary by CodeRabbit
New Features
Bug Fixes
Chores